Proving Class Equivalence

نویسندگان

  • Vasileios Koutavas
  • Mitchell Wand
چکیده

We present a sound and complete method for reasoning about contextual equivalence between different implementations of classes in an imperative subset of Java. Our technique successfully deals with public and private methods and fields, imperative fields, inheritance, and invocations of callbacks. To the extent of our knowledge this is the first sound and complete proof method of equivalence between classes for such a subset of Java. Using our technique we were able to prove equivalences in examples with higherorder behavior, where previous methods for functional calculi admit limitations [17, 20]. We were also able to show equivalences between classes that expose part of their state using public fields, hide part of their functionality using private methods, and are extensible by the surrounding context. Other reasoning techniques for classbased languages [2, 10] restrict the way a class communicates with and abstracts functionality from its context. We derive our technique following a methodology similar to our previous work on functional [13] and object-based [12] languages, thus showing that this methodology gives useful results in a diversity of languages.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A Sufficient Condition for the Observational Equivalence of Processes

The article deals with the problem of proving observational equivalence for the class of computational processes called processes with message passing. These processes can execute actions of the following forms: sending or receiving of messages, checking logical conditions and updating values of internal variables of processes. Our main result is a theorem that reduces the problem of proving ob...

متن کامل

FUZZY SUBGROUPS AND CERTAIN EQUIVALENCE RELATIONS

In this paper, we study an equivalence relation on the set of fuzzysubgroups of an arbitrary group G and give four equivalent conditions each ofwhich characterizes this relation. We demonstrate that with this equivalencerelation each equivalence class constitutes a lattice under the ordering of fuzzy setinclusion. Moreover, we study the behavior of these equivalence classes under theaction of a...

متن کامل

Two-dimensional affine R-buildings defined by generalized polygons with non-discrete valuation

In this paper we complete the proof of the ‘equivalence’ of non-discrete Rbuildings of types Ã2 and C̃2, with, respectively, projective planes and generalized quadrangles with non-discrete valuation, begun in [7]. We also complete the proof of the ‘equivalence’ of an affine building of rank 3 with a generalized polygon with discrete valuation (by proving this for generalized hexagons), begun in ...

متن کامل

THE CLASS OF ALL REGULAR EQUIVALENCES: ALGEBRAIC STRUCTURE AND COMPUTATION t

In this paper, we explore the structure of the set of all regular equivalences (White and Reitz 1983) proving that it forms a lattice, and suggest a general approach to computing certain elements of the lattice. The resulting algorithm represents a useful complement to the White and Reitz algorithm, which can only find the maximal regular equivalence of a graph. Using this algorithm, it is poss...

متن کامل

Véronique Cortier and Stéphanie Delaune A method for proving observational equivalence Research Report LSV - 09 - 04 February 2009

Formal methods have proved their usefulness for an-alyzing the security of protocols. Most existing resultsfocus on trace properties like secrecy or authentication.There are however several security properties, whichcannot be defined (or cannot be naturally defined) astrace properties and require the notion of observationalequivalence. Typical examples are anonymity, pri...

متن کامل

Novel Relationships Between Circular Planar Graphs and Electrical Networks

Circular planar graphs are used to model electrical networks, which arise in classical physics. Associated with such a network is a network response matrix, which carries information about how the network behaves in response to certain potential differences. Circular planar graphs can be organized into equivalence classes based upon these response matrices. In each equivalence class, certain fu...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2006